import fastapi as fastapi
from UserLogin import UserLoginDto
from UserService import do_login

app123 = fastapi.FastAPI()


@app123.post("/user/login")
def login(param: UserLoginDto):
    print("%s 登录成功！" % param.username)

    result = do_login(param.username, param.password)

    user_info = {
        "logo" : "http://aaa.aaa.aaa/aaa.aaa.jpg",
        "nickname" : "小张",
        "result" : result
    }

    return user_info

